import request from '@/utils/request'
import { apiUrl } from '@/config/env'

export function getWares(data) {
  return request({
    url: `${apiUrl}/ware/getWares`,
    method: 'get',
    params: data
  })
}

export function getWareInfo(data) {
  return request({
    url: `${apiUrl}/ware/getWareInfo`,
    method: 'get',
    params: data
  })
}

export function saveWare(data) {
  return request({
    url: `${apiUrl}/ware/saveWare`,
    method: 'post',
    params: data
  })
}

export function setWareState(data) {
  return request({
    url: `${apiUrl}/ware/setWareState`,
    method: 'post',
    params: data
  })
}

export function setWareModelState(data) {
  return request({
    url: `${apiUrl}/ware/setWareModelState`,
    method: 'post',
    params: data
  })
}

export function delWare(data) {
  return request({
    url: `${apiUrl}/ware/delWare`,
    method: 'post',
    params: data
  })
}
export function updateStock(data) {
  return request({
    url: `${apiUrl}/ware/updateStock`,
    method: 'post',
    params: data
  })
}

